using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniAspNetCore
{
    /// <summary>
    /// http请求
    /// </summary>
    public class HttpRequest
    {
        private readonly IHttpRequestFeature _feature;

        public HttpRequest(IFeatureCollection features) => _feature = features.Get<IHttpRequestFeature>();

        //public Uri Url { get; set; }
        //public NameValueCollection Headers { get; set; }
        //public Stream Body { get; set; }

        public Uri Url => _feature.Url;
        public NameValueCollection Headers => _feature.Header;
        public Stream Body => _feature.Body;
    }
}
